import 'package:get/get.dart';
import 'package:get/get_rx/get_rx.dart';
import 'package:get/get_rx/src/rx_types/rx_types.dart';

/// 启动页状态管理 - Splash State Management
///
/// 管理启动页面的所有状态变量
/// Manages all state variables for splash page
class SplashState {
  /// 是否正在加载 - Whether loading
  RxBool isLoading = false.obs;

  /// 错误信息 - Error message
  String? errorMessage;

  /// 初始化进度 - Initialization progress
  RxDouble progress = 0.0.obs;

  /// 初始化状态消息 - Initialization status message
  RxString statusMessage = "".obs;

  /// 是否初始化完成 - Whether initialization completed
  RxBool isInitialized = false.obs;

  /// 倒计时 - Countdown
  RxInt countdown = 5.obs;

  /// 权限是否已授予 - Whether permission granted
  RxBool permissionGranted = false.obs;

  /// 是否正在显示对话框 - Whether showing dialog
  RxBool showingDialog = false.obs;

  /// 是否正在加载数据 - Whether loading data
  RxBool isLoadingData = false.obs;

  /// 是否有网络错误 - Whether has network error
  RxBool hasNetworkError = false.obs;

  // SplashState({
  //   this.isLoading = false,
  //   this.errorMessage,
  //   this.progress = 0.0,
  //   this.statusMessage = '',
  //   this.isInitialized = false,
  //   this.countdown = 5,
  //   this.permissionGranted = false,
  //   this.showingDialog = false,
  //   this.isLoadingData = false,
  //   this.hasNetworkError = false,
  // });
}
